let mixin = {
    methods: {
        execCommand: (command,aShowDefaultUI = false, value) => {
            console.log("value====", value, command)
            value ? document.execCommand(command, aShowDefaultUI, value) : document.execCommand(command, aShowDefaultUI, null)

        },
         //取得该文件的url
        getObjectURL(file) {
            var url = null;
            if (window.createObjectURL != undefined) {
                url = window.createObjectURL(file);
            } else if (window.URL != undefined) {
                url = window.URL.createObjectURL(file);
            } else if (window.webkitURL != undefined) {
                url = window.webkitURL.createObjectURL(file);
            }
            return url;
        },
        restoreRange(currentSelection) {
            let selection = window.getSelection();
            selection.removeAllRanges();
            let range = document.createRange();
            range.setStart(currentSelection.startContainer, currentSelection.startOffset);
            range.setEnd(currentSelection.endContainer, currentSelection.endOffset);
            // 向选区中添加一个区域
            selection.addRange(range);
        },
    },
}
export default mixin